package Others.DesignPattern.SimpleFactoryPattern.Original;

public class Operation {

    public double getResult(double num1, double num2,String operation) {

        return switch (operation) {
            case "+" -> num1 + num2;
            case "-" -> num1 - num2;
            case "*" -> num1 * num2;
            case "/" -> num1 / num2;
            default -> 0;
        };

    }

}
